package com.gwtgeo.ui.shared.event;

import org.gwtopenmaps.openlayers.client.layer.Layer;

import com.google.gwt.event.shared.GwtEvent;

public class AddLayerEvent extends GwtEvent<AddLayerEventHandler>{

	public static Type<AddLayerEventHandler> TYPE = new Type<AddLayerEventHandler>();

	private Layer layer;
	
	public AddLayerEvent(Layer layer) {
		super();
		this.layer = layer;
	}

	@Override
	protected void dispatch(AddLayerEventHandler handler) {
		handler.onAddLayer(this);
	}

	@Override
	public com.google.gwt.event.shared.GwtEvent.Type<AddLayerEventHandler> getAssociatedType() {
		return AddLayerEvent.TYPE;
	}

	public Layer getLayer() {
		return layer;
	}
}
